
. 
. *******************************
. *
. * Produce Online Appendix Tables and Event Study Figures
. *
. *******************************
. 
. 
. ******************************************************************************************************
> ***********
. ****************************** Appendix Table 1: The Effect of Borrow History on Loan Terms **********
> ***********
. ******************************************************************************************************
> ***********
. 
. use loanshark_data_final, clear

. 
. ** Setup - Generate new vars
. gen noborrowhist = (borrowhist==0 & borrowhist!=.)

. label var noborrowhist "Never borrowed from this lender before"

. label var borrowhist "Times previously borrowed from this lender"

. 
. xtset shark5_bor
       panel variable:  shark5_bor (unbalanced)

. qui xi: xtreg lloan noborrowhist borrowhist i.year ,fe

. est store r1

. qui xi: xtreg lloan noborrowhist borrowhist i.year conditn* reasonn* ,fe

. est store r2

. qui xi: xtreg rate_pct noborrowhist borrowhist i.year ,fe

. est store r3

. qui xi: xtreg rate_pct noborrowhist borrowhist i.year conditn* reasonn* ,fe

. est store r4

. esttab r1 r2 r3 r4,keep(noborrowhist borrowhist) se

----------------------------------------------------------------------------
                      (1)             (2)             (3)             (4)   
                    lloan           lloan        rate_pct        rate_pct   
----------------------------------------------------------------------------
noborrowhist       -0.291***       -0.268***        0.212           0.165   
                 (0.0335)        (0.0319)         (0.172)         (0.164)   

borrowhist         0.0387***       0.0252***      -0.0352         -0.0392*  
                (0.00363)       (0.00354)        (0.0185)        (0.0182)   
----------------------------------------------------------------------------
N                   11008           10990           11022           11004   
----------------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001

. 
. ******************************************************************************************************
> ************
. ****************************** Appendix Table 2. The Effect of Repayment History on Loan Terms *******
> ************
. ******************************************************************************************************
> ************
. 
. eststo clear

. 
. 
. local vars "repayendD repaytime default"

. foreach v in `vars'{
  2.         
.          bys shark5_bor (year month loanno): gen `v'L1=`v'[_n - 1]
  3. }
(5,593 missing values generated)
(5,777 missing values generated)
(5,594 missing values generated)

. 
. 
. * Loan (borr-lender FE)
. lab var repaytimeL1 "Lag 1: Time to repay (months)"

. lab var defaultL1 "Lag 1: Default"

. lab var repayendDL1 "Lag 1: Repaid Eventually"

. qui xi: areg  lloan repaytimeL1 i.year ,abs(shark5_bor)

. est store f1

. qui xi: areg  lloan defaultL1 i.year   ,abs(shark5_bor)

. est store f2

. qui xi: areg  lloan repayendDL1 i.year  ,abs(shark5_bor)

. est store f3

. 
. 
. 
. * Rate (borr-lender FE)
. sum rate_pct 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |     11,032    22.10334    6.581334          2         50

. qui xi: areg  rate_pct repaytimeL1 i.year ,abs(shark5_bor)

. est store f4

. qui xi: areg  rate_pct defaultL1 i.year ,abs(shark5_bor)

. est store f5

. qui xi: areg  rate_pct repayendDL1 i.year,abs(shark5_bor)

. est store f6

. 
. esttab f1 f2 f3 f4 f5 f6, drop(_Iyear*) se

--------------------------------------------------------------------------------------------------------
> ----
                      (1)             (2)             (3)             (4)             (5)             (6
> )   
                    lloan           lloan           lloan        rate_pct        rate_pct        rate_pc
> t   
--------------------------------------------------------------------------------------------------------
> ----
repaytimeL1       -0.0195**                                       0.00799                               
>     
                (0.00662)                                        (0.0366)                               
>     

defaultL1                         -0.0563***                                       0.0224               
>     
                                 (0.0165)                                        (0.0905)               
>     

repayendDL1                                         0.147***                                        0.19
> 3   
                                                 (0.0341)                                         (0.186
> )   

_cons               7.454***        7.446***        7.254***        18.54***        18.56***        18.3
> 8***
                 (0.0336)        (0.0304)        (0.0435)         (0.186)         (0.167)         (0.238
> )   
--------------------------------------------------------------------------------------------------------
> ----
N                    5239            5422            5423            5251            5434            543
> 5   
--------------------------------------------------------------------------------------------------------
> ----
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001

. 
. log close
      name:  <unnamed>
       log:  /Users/huailu/Documents/Loanshark/Data and Codes/Loanshark_OnlineAppendix_Tables.log
  log type:  text
 closed on:  18 Aug 2022, 23:05:02
--------------------------------------------------------------------------------------------------------
